<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
  <title>Setting Up WebCollab</title>
  <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
 <link rel="StyleSheet" href="doc.css" type="text/css" />
</head>
<body>
<h1><a name="top">WebCollab Setup</a></h1>
<h3>SETUP INDEX</h3>
<p><a href="#setup">WebCollab Setup Program</a><br />
<a href="#upgrade">Upgrading to Newer WebCollab Version </a><br />
<a href="#mysql">Manual Setup for MySQL</a><br />
<a href="#postgresql">Manual Setup for PostgreSQL</a><br /></p>
<h3><a name="setup">WEBCOLLAB SETUP PROGRAM</a></h3>
<p>Note: To enable the setup program to write to your configuration file, the file '/config/config.php'
<span style="text-decoration: underline">must</span> be made writable by the web server.  If the file is
not writable, then only the databases can be created.</p>
<h4>1. First Time Setup</h4>
<ol>
<li>For UNIX and other *nix OS: 
<ul>
<li>Navigate to your main WebCollab directory.</li>
<li>Make [webcollab_directory]/config/config.php file writable by everyone.
<pre class="screen">
#chmod 666 config.php
</pre></li>
</ul>
</li>
<li>Point your web browser at http://your_site/webcollab_directory/setup.php (Replace
'your_site' and 'webcollab_directory' with the relevant values for your site.</li>
<li>Follow the on-screen instructions to setup WebCollab.</li>
<li>For UNIX and other *nix OS: 
<ul>
<li>Make config.php protected again.
<pre class="screen">
#chmod 664 config.php
</pre></li>
</ul>
</li>
</ol>
<h4>2. Getting Online:</h4>
<ul>
<li>Point your browser to http://your_site/webcollab_path/index.php.  If all is well, you should see a login
page.<br/>
<br />
Username: <b>admin</b><br />
Password: <b>admin123</b></li>
</ul>
<h4>3. Admin Config Setup</h4>
<ol>
<li>From the main screen, click on the 'Admin config' link in the menu boxes, left hand side of page.  Depending on your screen resolution, you may have to scroll down to see it.</li>
<li>Enter the requisite email addresses for your site into the boxes.  Click on the descriptions for more help.</li>
<li>The default check box settings in the lower part of the form can be left for now.</li>
<li>Press the update button.</li>
</ol>
<h4>4. Change Admin Password and Email Address</h4>
<ul>
<li>Click on the 'Edit user details' button and change the admin password (and email address).</li>
</ul>
<h4>5. Altering Setup (if required)</h4>
<ol>
<li>For UNIX: Make [webcollab_directory]/config/config.php writable by everyone.</li>
<li>Edit config.php, and change $WEB_CONFIG = "Y" (it should have defaulted to "N").</li>
<li>Point your web browser at http://your_site/webcollab_directory/setup/index.php</li>
<li>Enter an admin login and password</li>
<li>Follow the on-screen instructions to setup WebCollab.</li>
<li>For UNIX: Make config.php protected again.</li>
</ol>
<p>Note: The config.php can also be edited directly with a text editor.  The comments in the file explain most of the
various configuration items.</p>
<h3><a name="upgrade">UPGRADING WEBCOLLAB TO A NEWER VERSION</a></h3>
<ol>
<li>Install the new files in a new directory (You can install over the existing directory, but this method is
safer).</li>
<li>For UNIX: Make sure [webcollab_directory]/config/config.php file is writable by everyone.</li>
<li>Point your web browser at http://your_site/webcollab_directory/setup.php (Replace
'your_site'and 'webcollab_directory' with the relevant values for your site.</li>
<li>At the first screen prompt, choose to use an <b>existing database</b>. Do not create a new database.</li>
<li>Enter your current database details at the screen prompt that follows.</li>
<li>Let the setup program continue to the conclusion, but do not attempt to login.</li>
<li>Point your browser at http://your_site/webcollab_directory/update.php (Replace
'your_site' and 'webcollab_directory' with the relevant values for the new files on your site).</li>
<li>Login as requested...</li>
<li>Database upgrade is done automatically (If database upgrades are in fact not required, no harm will be done).</li>
<li>If you are storing uploaded files in the default upload directory of /files/filebase, you need to copy/move the
existing uploaded files across to the same directory in the new WebCollab.</li>
<li>You can now delete your old WebCollab directory, and rename the new WebCollab directory to match the old.  Note that
you <b>must</b> change the BASE_URL parameter in /config/config.php to match the correct directory. You will also need
to the same for the FILE_BASE parameter, if you use the default directory.  To do this:
<ul>
<li>Open config.php with your favourite text editor</li>
<li>Find the line with <b>BASE_URL</b>.  It is near the top of the file.
<pre class="screen">
define('BASE_URL', "http//your_domain.com/old_webcollab_directory/" );
</pre></li>
<li>Change this line to match the new directory (Don't forget the trailing slash...)
<pre class="screen">
define('BASE_URL', "http//your_domain.com/<i>new_webcollab_directory/</i>" );
</pre></li>
<li>Now make sure that FILE_BASE is pointing to the right upload directory.  The entry needs to be a full path to the
new upload directory:
<pre class="screen">
define('FILE_BASE', "/var/www/html/webcollab/files/filebase" );
</pre></li>
<li>Save the edited file.</li>
</ul>
</li>
<li>For UNIX: Make config.php protected again.</li>
</ol>
<p>The database upgrades (if required) are backwardly compatible and do not affect stored data.  However, as with all
upgrades, backing up your data is a sensible precaution.<br />
Note: Database upgrades are required for all pre-2.20 databases.</p>
<h3><a name="mysql">MANUAL SETUP FOR MYSQL</a></h3>
<h4>1. Database Setup and Customisation:</h4>
<p><b>Note</b>: If you are using Linux, you can automate database creation and populating
with tables. See <a href="#linux">below</a>.</p>
<ol>
<li>Make sure you have a valid user account and password for MySQL.  (We'll call them 'user_name'
and 'your_password' in this example).</li>
<li>Choose a new MySQL database name with a convenient name of your choice.  (We'll call the database
'webcollab' in this example).</li>
<li>Enter the MySQL database command mode.  Make sure that your user_name has enough rights to
make new databases.  Enter your password when prompted.
<pre class="screen"># mysql -u user_name -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 14
Server version: 5.0.32-Debian_7etch8-log Debian etch distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

</pre></li>
<li>Create the database 'webcollab', and then quit the command mode.  Don't forget the semi-colon
at the end of the first line!
<pre class="screen">
mysql> CREATE DATABASE webcollab CHARACTER SET utf8;
Query OK, 1 row affected (0.05 sec)

mysql> \q
Bye
#
</pre></li>
</ol>
<h4>2. Populate Database:</h4>
<ol>
<li>Use the provided "webcollab-*.**/db/mysql.sql" script to populate the webcollab
database.</li>
<li>For a *nix system navigate to your web server root directory.  Enter your password again when
prompted.
<pre class="screen">
#mysql -u user_name -p webcollab < ./webcollab-*.**/db/schema_mysql.sql
</pre></li>
<li>If you are installing to a Windows system, then from the command prompt, work your way into the
"webcollab/db" folder.  Then, run the following command:
<pre class="screen">
 mysql -uuser_name -pyour_password webcollab>schema_mysql.sql
</pre></li>
</ol>
<h4>3. Configuration File Customization:</h4>
<ol>
<li>Open the file webcollab/config/config.php with your favourite text editor.</li>
<li>Fill in the line <b>define('BASE_URL', "");</b> with the address of your site:
<pre class="screen">
define('BASE_URL', "http//your_domain.com/webcollab-*.**/" );
</pre></li>
<li>Fill in the lines with <b>DATABASE_NAME</b>, <b>DATABASE_USER</b> and <b>DATABASE_PASSWORD</b>:
<pre class="screen">
define('DATABASE_NAME', "webcollab" );
define('DATABASE_USER', "user_name" );
define('DATABASE_PASSWORD', "your_password" );
</pre></li>
<li>If you are using a database on a remote machine, then change the default value of
<b>DATABASE_HOST</b> too.</li>
<li>Save and close the file.</li>
</ol>
<h4>4. Getting Online:</h4>
<ul>
<li>Point your browser to http://yourdomain.com/webcollab-*.**/index.php.  If all is well, you
should see a login page.<br />Username: <b>admin</b>
<br />Password: <b>admin123</b></li>
</ul>
<h4>5. Admin Config Setup</h4>
<ol>
<li>From the main screen, click on the 'Admin config' link in the menu boxes, left hand side of
page.  Depending on your screen resolution, you may have to scroll down to see it.</li>
<li>Enter the requisite email addresses for your site into the boxes.  Click on the descriptions for
more help.</li>
<li>The default check box settings in the lower part of the form can be left for now.</li>
<li>Press the update button.</li>
</ol>
<h4>6. Change Admin Password and Email Address</h4>
<ul>
<li>Click on the 'Edit user details' button and change the admin password (and email address).</li>
</ul>
<h3><a name="linux">AUTOMATED MYSQL INSTALLATION FOR LINUX</a></h3>
<ol>
<li>Proceed through steps 1 and 2 as above.</li>
<li>Create and Populate the Database
<ul>
<li>Make sure you have a valid user account and password for MySQL.  (We'll call them 'user_name'
 and 'your_password' in this example).</li>
<li>Choose a new MySQL database name with a convenient name of your choice.  (We'll call the
database 'webcollab' in this example).</li>
<li>Navigate to your web server root directory.</li>
<li>Run the command db_create_mysql.sh with the required options
<pre class="screen">
#./webcollab-*.**/db/db_create_mysql.sh user_name webcollab your_password
</pre></li>
<li>All done!</li>
<li>Carry on from step 4 above.</li>
</ul></li>
</ol>
<h3><a name="postgresql">MANUAL SETUP FOR POSTGRESQL</a></h3>
<h4>1. PostgreSQL Database Setup and Customisation:</h4>
<p><b>Note</b>: If you are using Linux, you can automate database creation and populating
with tables. See <a href="#linux_postgres">below</a>.</p>
<ul>
<li>Make sure you have a valid user account and password for PostgreSQL.  (We'll call them
'user_name'and'your_password' in this example).</li>
<li>Choose a new PostgreSQL database name with a convenient name of your choice.  (We'll call the
database'webcollab' in this example).</li>
<li>Enter the MySQL database command mode.  Make sure that your user_name has enough rights to
make new databases.  Enter your password when prompted.
<pre class="screen">
# createdb -W -E UTF8 -U user_name webcollab
Enter password:
=# CREATE DATABASE 'database name';
=# \q
</pre></li>
</ul>
<h4>2. Populate Database:</h4>
<ol>
<li>Use the provided "webcollab-*.**/db/pgsql.sql" script to populate the webcollab database.</li>
<li>For a *nix system navigate to your web server root directory.  Enter your password again when
prompted.
<pre class="screen">
# psql -U 'database_user' -e 'database_name' < schema-pgsql.sql
</pre></li>
</ol>
<h4>3. Configuration File Customization:</h4>
<ol>
<li>Open the file webcollab/config.php with your favourite text editor.</li>
<li>Fill in the line <b>define('BASE_URL', "");</b> with the address of your site:
<pre class="screen">
define('BASE_URL', "http//your_domain.com/webcollab-*.**/" );
</pre></li>
<li>Fill in the lines with <b>DATABASE_NAME</b>, <b>DATABASE_USER</b>, <b>DATABASE_PASSWORD</b> and
<b>DATABASE_TYPE</b>:
<pre class="screen">
define('DATABASE_NAME', "webcollab" );
define('DATABASE_USER', "user_name" );
define('DATABASE_PASSWORD', "your_password" );
define('DATABASE_TYPE', "postgresql" );
</pre></li>
<li>Do not change the default value of <b>DATABASE_HOST</b> unless you have
re-configured PostgreSQL to accept TCP/IP connections</li>
<li>Save and close the file.</li>
</ol>
<h4>4. Getting Online:</h4>
<ul>
<li>Point your browser to http://yourdomain.com/webcollab-*.**/index.php.  If all is well, you
should see a login page.<br />
Username: <b>admin</b><br />
Password: <b>admin123</b></li>
</ul>
<h4>5. Admin Config Setup</h4>
<ol>
<li>From the main screen, click on the 'Admin config' link in the menu boxes, left hand side of
page.  Depending on your screen resolution, you may have to scroll down to see it.</li>
<li>Enter the requisite email addresses for your site into the boxes.  Click on the descriptions for
more help.</li>
<li>The default check box settings in the lower part of the form can be left for now.</li>
<li>Press the update button.</li>
</ol>
<h4>6. Change Admin Password and Email Address</h4>
<ul>
<li>Click on the 'Edit user details' button and change the admin password (and email address).</li>
</ul>
<h3><a name="linux_postgres">AUTOMATED POSTGRESQL INSTALLATION FOR LINUX</a></h3>
<ol>
<li>Create and Populate the Database
<ul>
<li>Make sure you have a valid user account and password for PostgreSQL.  (We'll call them
'user_name'and 'your_password' in this example).</li>
<li>Choose a new PostgreSQL database name with a convenient name of your choice.  (We'll call the
database 'webcollab' in this example).</li>
<li>Navigate to your web server root directory.</li>
<li>Run the command db_create_mysql.sh with the required options
<pre class="screen">
# ./db_create_pgsql.sh user_name webcollab
</pre></li>
<li>All done!</li>
<li>Carry on from step 3 above.</li>
</ul></li>
</ol>
</body>
</html>
